stylecontext: Don't queue_resize() all the time
authorBenjamin Otte <otte@redhat.com>
Mon, 2 Apr 2012 21:28:37 +0000 (23:28 +0200)
committerBenjamin Otte <otte@redhat.com>
Tue, 17 Apr 2012 06:59:17 +0000 (08:59 +0200)
When a parent style context exists, there's no need to queue_resize() on
the widget, because the parent widget will call
gtk_style_context_validate() on us and _then_ we can call queue_resize()
if we have to.

gtk/gtkstylecontext.c

index b319ada3f66de2c90306ca3ae9db000ebb055639..5c739230fccdde9a381ddc8f3a528f98f961d875 100644 (file)
@@ -1030,10 +1030,10 @@ gtk_style_context_set_invalid (GtkStyleContext *context,
 
   if (invalid)
     {
-      if (priv->widget)
-        gtk_widget_queue_resize (priv->widget);
       if (priv->parent)
         gtk_style_context_set_invalid (priv->parent, TRUE);
+      else if (priv->widget)
+        gtk_widget_queue_resize (priv->widget);
     }
 }